package com.easyhouse.common.pojo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class User {
	private String userId;
	@NotEmpty(message = "用户名不能为空！")
	private String userName;
	@NotEmpty(message = "密码不能为空")
	@Size(min = 6,max = 20,message = "密码长度必须在6~20位")
	private String userPassword;
	@NotEmpty(message = "确认密码不能为空")
	@Size(min = 6,max = 20,message = "密码长度必须在6~20位")
	private String userPassword2;
	private String userPhone;
	@NotEmpty(message = "昵称不能为空")
	private String userNickname;
	@NotEmpty(message = "邮箱不能为空！")
	@Email(message = "邮箱格式不正确！")
	private String userEmail;
	private Integer userType=0;//默认都是0
	private String extend;
}
